package com.timoon.manager.panel.product;

import java.util.List;

import javax.swing.tree.DefaultTreeModel;

import com.timoon.sample.dao.model.Product;
import com.timoon.sample.dao.model.ProductInstructionPic;
import com.timoon.sample.dao.model.ProductProperty;
import com.timoon.sample.dao.model.ProductSort;

public interface ProductGridService {

	List<Product> getAllProduct();
	
	ProductSort getSortByProductId(Integer id);
	
	DefaultTreeModel getDefaultTreeModelWithProductSort();//把商品分类以tree model展现
	
	List<ProductInstructionPic> getProductInstructionPicByProductId(Integer id);
	
	void deleteProductInstructionPicById(Integer id);
	
	void addProductInstructionPic(String path,Integer productId);
	
	List<ProductProperty> getProductPropertyByProductId(Integer id);
	
	void delProductPropertyById(Integer id);
	
	void addProductProperty(ProductProperty productProperty);
	
	void addProduct(Product product);
	
	Product getRegistProduct();//向数据库注册product，使之有id属性
	
	void deleteProductByIds(List<String> ids);
}
